<template>
  <div id="work-bench">
    <el-row :gutter="24">
      <el-col :span="14">
        <div class="grid-content">
          <div class="header">机构概述</div>
          <div class="content">
            <div class="content-left">
              <div class="area">{{ couriesName }}</div>
              <div class="adress">地址：北京顺义区天澜综合保税区123号</div>
              <div class="person">负责人：赵五金 16712345678</div>
              <div class="more">查看营业部分布</div>
            </div>
            <div class="content-right">
              <div class="right-item">
                <span class="type">分拣中心(个)</span>
                <span class="count">1</span>
              </div>
              <div class="right-item">
                <span class="type">分拣中心(个)</span>
                <span class="count">4</span>
              </div>
              <div class="right-item">
                <span class="type">分拣中心(个)</span>
                <span class="count">48</span>
              </div>
              <div class="right-item">
                <span class="type">分拣中心(个)</span>
                <span class="count">64</span>
              </div>
            </div>
          </div>
        </div>
      </el-col>
      <el-col :span="10">
        <div class="grid-content">
          <div class="header">
            <div>今日数据</div>
            <div class="time"> <i class="el-icon-refresh" style="color:#ff6b4a" /> 202-05-18 14:11</div>
          </div>
          <div class="content-data">
            <div class="content-item">
              <span>订单金额(元)</span>
              <span class="num"><el-statistic group-separator="," :value="value" :value-style="fontSize" /></span>
              <span class="trend">较昨日 +444</span>
            </div>
            <div class="content-item">
              <span>订单金额(元)</span>
              <span class="num">2284</span>
              <span class="trend">较昨日 +444</span>
            </div>
            <div class="content-item">
              <span>订单金额(元)</span>
              <span class="num">2284</span>
              <span class="trend">较昨日 +444</span>
            </div>
          </div>
        </div>
      </el-col>
    </el-row>
    <water-map />
    <el-row>
      <el-col :span="24">
        <div class="grid-content">
          <div class="header">
            <div>今日数据</div>
          </div>
          <div class="content">
            <div class="function"><svg-icon icon-class="car" style="font-size:40px" /><span>快递作业</span></div>
            <div class="function"><svg-icon icon-class="car" style="font-size:40px" /><span>快递作业</span></div>
            <div class="function"><svg-icon icon-class="car" style="font-size:40px" /><span>快递作业</span></div>
            <div class="function"><svg-icon icon-class="car" style="font-size:40px" /><span>快递作业</span></div>
            <div class="function"><svg-icon icon-class="car" style="font-size:40px" /><span>快递作业</span></div>
            <div class="function"><svg-icon icon-class="car" style="font-size:40px" /><span>快递作业</span></div>
          </div>
        </div>
      </el-col>
    </el-row>
    <el-row :gutter="24">
      <el-col :span="12">
        <div class="grid-content">
          <div class="header">
            <div>线路管理</div>
          </div>
        </div>
      </el-col>
      <el-col :span="12">
        <div class="grid-content">
          <div class="header">
            <div>运输任务</div>
            <div class="to-more">查看更多<i class="el-icon-arrow-right" /></div>
          </div>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  name: 'Dashboard',
  computed: {
    ...mapGetters([
      'name'
    ])
  }
}
</script>

<style lang="scss" >
#work-bench{
  .el-row {
  overflow: hidden;
  margin-bottom: 20px;
  &:last-child {
    margin-bottom: 0;
  }
}
.el-col {
  border-radius: 4px;
}
.grid-content {
  border-radius: 4px;
  // min-height: 235px;
  overflow: hidden;
  padding: 23px 20px;
  background-color: #fff;
  .header {
    display: flex;
    justify-content:space-between;
    font-weight: 700;
    margin-bottom: 16px;
    .to-more{
      color: #818693;
      font-weight: 400;
      font-size: 14px;
    }
    .time{
      font-weight: normal;
      font-size: 14px;
      color: #818693;
    }
    ::v-deep .tips{
      p{
        padding: 0 15px;
        color:#989898;
      }
    }
    .el-button{
      padding: 0;
      border-style: none;
    }
  }
  .content {
    display: flex;
    justify-content: space-between;
    padding-left: 10px;
    .content-left {
      flex: 1;
      color: #303133;
      border-right: 1px solid #ebeef5;
      .area {
        margin: 20px 0 13px;
      }
      .adress {
        color: #818693;
        font-size: 14px;
        margin-bottom: 8px;
      }
      .person {
        color: #818693;
        font-size: 14px;
        margin-bottom: 23px;
      }
      .more {
        width: 158px;
        height: 40px;
        background: #ffeeeb;
        border: 1px solid #f3917c;
        border-radius: 4px;
        cursor: pointer;
        line-height: 40px;
        font-size: 14px;
        color: #e15536;
        text-align: center;
        &:hover {
          background: #ff6b4a;
          color: #fff;
        }
      }
    }
    .content-right {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    .right-item {
      flex: 50%;
      display: flex;
      padding-left: 47px;
      flex-direction: column;
      justify-content: center;
      .type{
        margin-bottom: 10px;
        font-size: 14px;
      }
      .count{
        font-size: 32px;
        font-weight: 700;
        color: #e15536;
        cursor: pointer;
      }
    }
    }
  }
  .content-data{
    display: flex;
    justify-content: space-around;
    height: 130px;
    padding-top: 10px;
    margin-bottom: 25px;
    .content-item{
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      align-items: center;
      font-size: 14px;
      .num{
        font-weight: 700;
        font-size: 32px;
      }
      .trend{
        color: #818693;
      }
    }
  }
  .function{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    width: 187px;
    height: 116px;
    border-radius: 4px;
    background: #fafafb;
    font-weight: 700;
    cursor: pointer;
  &:hover{
    color:#e15536;
  }
  }
  .chart-box{
    height: 208px;
  }
}
.row-bg {
  padding: 30px 0;
  background-color: #f9fafc;
}
}
</style>
